/**
 * Created by chaoyu on 2018/4/11.
 */
$(function () {
    var banner_html = '' +
        '<div class="slide"><a href=""><img src="'+path_tpl+'images/b01.png" /></a></div>'+
        '<div class="slide"><a href=""><img src="'+path_tpl+'images/b02.png" /></a></div>'+
        '<div class="slide"><a href=""><img src="'+path_tpl+'images/b03.png" /></a></div>'+
        '<div class="slide"><a href=""><img src="'+path_tpl+'images/b01.png" /></a></div>'+
        '<div class="slide"><a href=""><img src="'+path_tpl+'images/b02.png" /></a></div>';
    $(".banner").html(banner_html).slick({
        infinite: true,
        vertical: false,
        pauseOnHover: false,
        arrows: false,
        prevArrow: '<button type="button" data-role="none" class="slick-prev"><i class="xi-angle-left-thin"></i></button>',
        nextArrow: '<button type="button" data-role="none" class="slick-next"><i class="xi-angle-right-thin"></i></button>',
        dots: false,
        centerMode: true,
        centerPadding: "20%",
        slidesToShow: 1,
        slidesToScroll: 1,
        autoplay: true,
        autoplaySpeed: 1500,
        speed: 500,
    });

    var visual_box = $(".visual .wrap");
    if (visual_box.length > 0)
    {
        var visual = '' +
            '<div class="slide"><a href=""><img src="'+path_tpl+'images/v01.png" /></a></div>'+
            '<div class="slide"><a href=""><img src="'+path_tpl+'images/v01.png" /></a></div>'+
            '<div class="slide"><a href=""><img src="'+path_tpl+'images/v01.png" /></a></div>';
        visual_box.html(visual).slick({
            infinite: true,
            vertical: false,
            pauseOnHover: false,
            arrows: false,
            prevArrow: '<button type="button" data-role="none" class="slick-prev"><i class="xi-angle-left-thin"></i></button>',
            nextArrow: '<button type="button" data-role="none" class="slick-next"><i class="xi-angle-right-thin"></i></button>',
            dots: false,
            centerMode: false,
            centerPadding: 0,
            slidesToShow: 1,
            slidesToScroll: 1,
            autoplay: true,
            autoplaySpeed: 2000,
            speed: 1000,
        });
    }
})